package com.kunya.product.dao.active;

import com.kunya.product.po.ProductRecommend;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ProductRecommendMapper {
    int deleteByPrimaryKey(@Param("recommendProductId") Long recommendProductId,@Param("table_prefix") String tablePrefix);

    int insert(@Param("record") ProductRecommend record,@Param("table_prefix") String tablePrefix);

    int insertSelective(@Param("record") ProductRecommend record,@Param("table_prefix") String tablePrefix);

    ProductRecommend selectByPrimaryKey(@Param("recommendProductId") Long recommendProductId,@Param("table_prefix") String tablePrefix);

    int updateByPrimaryKeySelective(@Param("record") ProductRecommend record,@Param("table_prefix") String tablePrefix);

    int updateByPrimaryKey(@Param("record") ProductRecommend record,@Param("table_prefix") String tablePrefix);
    //根据商品ID查询推荐商品表list
    List<ProductRecommend> getProductRecommendById(@Param("productId") Long productId,@Param("table_prefix") String tablePrefix);
    //根据推荐ID查询显示推荐商品
    List<ProductRecommend> listByRecommendId(@Param("recommendId") Long recommendId,@Param("table_prefix") String tablePrefix);
}